Inside Macintosh: Sound

| Previous | Chapter contents | Chapter top | Section top | Next |

The Sound Data Chunk

The Sound Data Chunk contains the actual sample frames that make up the sampled sound. The Sound Data Chunk has this structure:

TYPE SoundDataChunk =
RECORD
    ckID:           ID;             {'SSND'}
    ckSize:         LongInt;        {size of chunk data}
    offset:         LongInt;        {offset to sound data}
    blockSize:      LongInt;        {size of alignment blocks}
END;

The offset field indicates an offset (in bytes) to the beginning of the first sample frame in the chunk data. Most applications do not need to use the offset field and should set it to 0.

The blockSize field contains the size (in bytes) of the blocks to which the sound data is aligned. This field is used in conjunction with the offset field for aligning sound data to blocks. As with the offset field, most applications do not need to use the blockSize field and should set it to 0.

The sampled-sound data follows the blockSize field. For information on the format of sampled-sound data, see "Sampled-Sound Data" .

The Sound Data Chunk is required unless the numSampleFrames field in the Common Chunk is 0. A maximum of one Sound Data Chunk can appear in an AIFF or AIFF-C file.


© 1998 Apple Computer, Inc.

| Previous | Chapter contents | Chapter top | Section top | Next |